
import os
from pyplusplus import module_builder

extension = os.path.abspath(os.path.dirname(__file__))
solution = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
path = solution.replace(os.path.sep, "/")

# PLEASE NOTE:
# GCCXML can't compile boost::asio in windows and boost::python itself (ABI error).
# We must comment these includes before generating a skeleton.

#Creating an instance of class that will help you to expose your declarations
mb = module_builder.module_builder_t( [r"%s/Caduceus.hpp" % extension]
                                      , gccxml_path=r"C:/Program Files/GCC_XML/gccxml.exe" 
                                      , working_directory=path
                                      , include_paths=['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/include', 'C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Include', 'C:/Program Files/boost/boost_1_36_0', 'C:/Program Files/Python25/include',
                                                       path,
                                                       "%s/Lib/pion-net/include" % path]                 
                                      , define_symbols=[
                                        #"WIN32_LEAN_AND_MEAN",
                                        #"WIN32", 
                                        #"_WINDOWS",
                                        #"_MT",
                                        "CADUCEUS_EXPORTS",
                                        "_EXTENSION",
                                        "PION_STATIC_LINKING",
                                        "BOOST_PYTHON_STATIC_LIB"] )


#Well, don't you want to see what is going on?
mb.print_declarations()

#Creating code creator. After this step you should not modify/customize declarations.
mb.build_code_creator( module_name='PyCaduceus' )

#Writing code to file.
mb.write_module( './bindings.cpp' )
